import httpInstance from "@/utils/http"

/**
 * 查询根目录文件
 * @returns {*}
 */
export function selectRootPath() {
    return httpInstance({
        method: "get",
        url: "/select/root"
    })
}

/**
 * 查询文件夹下的文件
 * @param folderPath 文件夹路径
 * @returns {*}
 */
export function selectFilePath(folderPath) {
    return httpInstance({
        method: "post",
        url: "/select/folderFile",
        data: {folderPath:folderPath}
    })
}

/**
 * 查看文件夹大小
 * @param filePath 文件路径
 * @returns {*}
 */
export function selectFileSize(filePath) {
    return httpInstance({
        method: "get",
        url: "/select/fileSize",
        params: {filePath}
    })
}

/**
 * 搜索文件
 * @param name 文件名
 * @returns {*}
 */
export function selectName(name,size) {
    return httpInstance({
        method: "get",
        url: "/select/name",
        params:{name,size}
    })
}

